﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DataAccess.Team>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    EditTeam
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        EditTeam</h2>
    <% using (Html.BeginForm())
       {%>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Fields</legend>
        <div style="display: none">
            <div class="editor-label">
                <%: Html.LabelFor(model => model.ID) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.ID) %>
                <%: Html.ValidationMessageFor(model => model.ID) %>
            </div>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.TeamName) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.TeamName) %>
            <%: Html.ValidationMessageFor(model => model.TeamName) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Points) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Points) %>
            <%: Html.ValidationMessageFor(model => model.Points) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Matches) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Matches) %>
            <%: Html.ValidationMessageFor(model => model.Matches) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Won) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Won) %>
            <%: Html.ValidationMessageFor(model => model.Won) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Lost) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Lost) %>
            <%: Html.ValidationMessageFor(model => model.Lost) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Tied) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Tied) %>
            <%: Html.ValidationMessageFor(model => model.Tied) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.NoResult) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.NoResult) %>
            <%: Html.ValidationMessageFor(model => model.NoResult) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Average) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Average, String.Format("{0:F}", Model.Average)) %>
            <%: Html.ValidationMessageFor(model => model.Average) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.NumberOfPlayers) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.NumberOfPlayers) %>
            <%: Html.ValidationMessageFor(model => model.NumberOfPlayers) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.CashRemaining) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.CashRemaining) %>
            <%: Html.ValidationMessageFor(model => model.CashRemaining) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.ImageUrl) %>
        </div>
        <div class="editor-field">
           
            <%: Html.Partial ("FileUploader") %>
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
